import 'package:customer/theme.dart';
import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter_gen/gen_l10n/gyy_local.dart';

void showMessage(BuildContext context, String content, {String? title}) {
  showSnackbar(
    context,
    Snackbar(
      content: Container(
        padding: EdgeInsets.all(20),
        color: Colors.grey[100].withOpacity(1),
        child: RichText(
          text: TextSpan(
            text: title ?? GyyLocal.of(context)!.tips + "：",
            style: TextStyle(color: AppTheme.accentColor),
            children: [
              TextSpan(
                text: content,
                style: const TextStyle(color:Colors.white),
              ),
            ],
          ),
        ),
      ),
      extended: true,
    ),
  );
}